home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d27
/
indntcl2.arc
/
READ.ME
< prev
Wrap
Text File
|
1991-12-04
|
3KB
|
71 lines
Indented CLP Listing Command (INDENTCL)
Written by: Scott Shepler
Programmer/Analyst for Systems Management, Inc. (SMI)
This command is used to create a listing of a CLP source member on the IBM
System/38 (or optionally, AS/400). On the listing, all command lines are
organized into a common format showing command labels always starting in the
same column and also showing all DO groups in an indented fashion. The source
member itself is not changed.
The most common usage of this command is when you encounter a source member
that has multiple nested IF-THEN-DO groups. This will allow you to print the
member in a common, familiar format that is easy to read.
This command also comes in handy when you have to debug a long CL Program which
was written by a programmer that lays their code out in a strange fashion that
to them, may seem easy to read, but to you looks like trash! Running this
command against the source will re-format the code into a listing that will be
easier for you to interpret and debug.
UPLOADING THE SOURCE:
PC Support/38 was used to download the source using "no conversion".
The reason it was done this way is to preserve the special attributes used
in commenting the source so, when you upload the source members to your S/38,
use "no conversion".
CHANGING THE SOURCE FOR THE AS/400 (Optional):
If this source is to be compiled on the IBM AS/400, one minor change needs to
be made to the CLP source before it can be compiled in native mode. Please
make the following change to the CLP source member INDENTCP.CLP:
Change ==> 0033.00 OVRDBF FILE(SRCFILE) TOFILE(&FILE.&LIB) MBR(&MBR)
To ==> 0033.00 OVRDBF FILE(SRCFILE) TOFILE(&LIB/&FILE) MBR(&MBR)
CREATING THE OBJECTS:
1). Execute the following command:
CRTSRCPF FILE(SRCFILE)
This will create a dummy source file in QGPL that will be used in
compiling the RPG program.
2). Compile the RPG program (INDENTCL.RPG).
3). Delete the dummy source file.
DLTF FILE(SRCFILE)
4). Compile the CLP program (INDENTCP.CLP).
5). Create the command INDENTCL using the source in INDENTCL.CMD
and specifying the CL Program INDENTCP as the CPP (Command Processing
Program.)
RUNNING THE COMMAND:
From a Command Entry line, type INDENTCL and prompt using Cmd4. Fill in
the name of the source file, source file library, and source file member
and press Enter. This command is also executable from within a CL program.
The print file used to create the listing is QSYSPRT, so if you wanted the
listing to go to an outq other than QPRINT, or you wanted the listing to
be SAVed after printing, before executing the INDENTCL command, execute an
override with print file (OVRPRTF) command to override the normal spool file
attributes of QSYSPRT.